import React from 'react';
import Home from "./pages/Home";
import Login from "./pages/Login";
import App from './App';
import Translate from './pages/Translate'
import NotFound from './pages/NotFound'

export default [
  /*{
    path: '/',
    component: Home,
    // exact: true, // 注意/ttt要匹配上的话 这里必须为false
    loadData: Home.loadData,
    key: 'home',
    routes: [{
      path: '/ttt',
      component: Login,
      exact: true,
      key: 'ttt'
    }]
  },*/


  /*{
    path: '/',
    component: Home,
    exact: true,
    loadData: Home.loadData,
    key: 'home'
  },
  {
    path: '/login',
    component: Login,
    exact: true,
    key: 'login'
  }*/


  {
    path: '/',
    component: App,
    loadData: App.loadData,
    exact: false,
    key: 'app',
    routes: [{
      path: '/',
      component: Home,
      exact: true,
      loadData: Home.loadData,
      key: 'home'
    },
    {
      path: '/login',
      component: Login,
      exact: true,
      key: 'login'
    },{
      path: '/translate',
      component: Translate,
      loadData: Translate.loadData,
      exact: true,
      key: 'translate'
    },{
      path: '*',
      component: NotFound,
      key: 'notfound'
    }]
  },
];
